<template>
   <header>
          <input type="text" placeholder="请输入todo" @keydown.enter="change">
    </header>
</template>

<script>
export default {
    methods:{
        change(e){
            this.$emit("submit",e.target.value)
        }
    }
}
</script>

<style lang="less" scoped>
    header{
        width: 100%;
        height: 60px;
        background: orange;
        padding: 7px;
        input{
            width: 100%;
            height: 100%;
            border-radius: 5px;
            border: 0;
            padding-left: 10px;
        }
    }
</style>